home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-12 | 2.0 KB | 79 lines | [TEXT/CWIE] |
- // =================================================================================
- //
- // >>> ⌐ 1996-1997 Microsoft Corporation. All rights reserved. <<<
- //
- // =================================================================================
-
- #ifndef _H_CTextEditControl
- #define _H_CTextEditControl
- #pragma once
-
- #include "CBaseControl.h"
- #include "CBaseCPClient.h"
-
- class CTextEditControl;
-
- class CTextEditContextInfo :
- public CBaseContextInfo
-
- {
- public:
- // *** CTextEditContextInfo ***
- CTextEditContextInfo(CTextEditControl* inControlP, Uint32 ContextID);
- virtual ~CTextEditContextInfo(void);
-
- // *** CBaseContextInfo methods ***
- virtual AXErrorCode Update(Boolean8 Acquired);
- virtual AXErrorCode Activate(Boolean8 Acquired);
- virtual AXErrorCode Deactivate(Boolean8 Acquired);
-
- // *** CTextEditContextInfo methods ***
- TEHandle GetTEHandle(void) { return mTextEditH; };
-
- private:
- TEHandle mTextEditH;
- };
-
-
- class CTextEditControl :
- public CBaseControl
- {
- public:
- friend class CTextEditContextInfo;
-
- // *** CTextEditControl methods ***
- CTextEditControl(void);
- ~CTextEditControl(void);
-
- // *** IControl methods ***
- STDMETHOD (Draw) (THIS_ AXDrawContext* inContext);
- STDMETHOD (GetID)(THIS_ Int32 inBufferSize, Char8* outID);
- STDMETHOD (DoMouse)(THIS_ AXMouseEventType inMouseET, AXPlatformEvent* inEvent);
- STDMETHOD (DoKey)(THIS_ AXKeyEventType inKeyET, Char8 inChar, AXPlatformEvent* inEvent);
- STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon) ;
- STDMETHOD (SetFocus)(THIS_ AXFocusCommand inCommand, AXFocusSet inFocus);
-
- // *** IPersistPropertyBag methods ***
- STDMETHOD (Load)(THIS_ IPropertyBag* PropBag, IErrorLog* ErrorLog);
-
- protected:
- // *** protected methods ***
- virtual CBaseContextInfo* NewContext(Uint32 inContextID);
- void TouchAllContexts(void);
-
- // *** protected data members ***
- Str255 mID;
- Handle mNewText;
- AXFocusSet mOwnedFoci;
- Int16 mStartSelection;
- Int16 mEndSelection;
- Int16 mFont;
- Int16 mSize;
- Int16 mFace;
- #if BE_STRICT
- Boolean8 mMouseWithIn;
- #endif // BE_STRICT
- };
-
- #endif
-